document.getElementById("save").onclick=function(){
	var password1=$("#password1").val()
	var password2=$("#password2").val()
	if(/^ *$/.test(password1)){
		showErrorInfo("密码不能为空！")
		document.getElementById("password1").focus()
		return false;
	}
	if(password1!==password2){
		alert("密码不一致！")
		$("#password1").val("")
		$("#password2").val("")
		return false;
	}
	if(!/^[0-9]+$/.test(password1)){
		showErrorInfo("密码只能为数字！")
		$("#password1").val("")
		$("#password2").val("")
		return false;

	}
	var data={}
	data.username=getQ().username
	data.password=password2
	data.type="admin"
	data=JSON.stringify(data)
	$.ajax({
		"url":"/reset_password/",
		"error":errorAjax,
		"complete":stop_load_pic,
		"beforeSend":start_load_pic,
		"data":{"data":data},
		"type":"POST",
		"success":function(data){
			if(responseCheck(data)){
				alert("密码已重置！")
				window.close()
			}
		}
	})
}
document.getElementById("password1").focus()
document.getElementById("username").value=getQ().username

